package com.summba.main.test;

import java.io.BufferedReader;
import java.util.Iterator;
import java.util.List;

import com.summba.analysis.util.WordUtil;
import com.summba.common.Common;
import com.summba.common.GetResource;

public class StatisticsKeyWord {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		GetResource res = new GetResource();
		System.out.println("res: "+res.getSegWordResFile());
		
		WordUtil wu = new WordUtil();
		
		/*
		 * load corpus file
		 */
		BufferedReader dbFileTempBR = Common.getFileInfo(res.getSegWordResFile());
		List<String> dbRecord =  Common.bufferedReaderToList(dbFileTempBR);
		for (Iterator<String> iterator = dbRecord.iterator(); iterator.hasNext();) {
			String string = (String) iterator.next();
			wu.addCorpus(string);
		}
		wu.showResult();

	}

}
